//
//  JWGRIDNewcell.m
//  koubei
//
//  Created by 李彦宏 on 2018/4/25.
//  Copyright © 2018年 朱圳. All rights reserved.
//

#import "JWGRIDNewcell.h"

@implementation JWGRIDNewcell


//类方法快速创建cell
+(instancetype)cellwithTableview:(UITableView *)tableview{
    
    // 1.创建cell
    static NSString *ID = @"cell112";
    JWGRIDNewcell *cell = [tableview dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[JWGRIDNewcell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
    }
    return  cell;
    
}
/**
 *  cell的初始化方法，一个cell只会调用一次
 *  一般在这里添加所有可能显示的子控件，以及子控件的一次性设置
 */
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        //添加UI控件
        [self setCellUI];
    }
    return self;
}
-(void)setCellUI{
    UILabel *lb1=[[UILabel alloc]init];
    lb1.frame=CGRectMake(8, 5, 200, 40);
    lb1.textAlignment=NSTextAlignmentLeft;
   
    lb1.font=[UIFont systemFontOfSize:15];
    lb1.textColor=[UIColor blackColor];
    self.IDNameLb=lb1;
    [self.contentView addSubview:lb1];
    
    UIImageView *IView=[[UIImageView alloc]initWithFrame:CGRectMake(ScreenWidth-68, 5 , 40, 40)];
//    IView.image=[UIImage imageNamed:@"NoData"];
    self.IDpicView=IView;
    [self.contentView addSubview:IView];
    UILabel *lb2=[[UILabel alloc]initWithFrame:CGRectMake(ScreenWidth-18, 5, 10, 40)];
    lb2.text=@">";
    lb2.textAlignment=NSTextAlignmentLeft;
    lb2.textColor=[UIColor lightGrayColor];
    lb2.font=[UIFont systemFontOfSize:20];
    [self.contentView addSubview:lb2];
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
